package com.tedu.bill.demo1;

/**
 * Author：毕龙
 * Date: 2024/5/21 11:37
 */
public class TestMyException {
    public static void main(String[] args) {
        //throw new MyException("非法用户名输入");
        //throw new MyException("验证码输入不正确");

        try {
            throw new MyException1("登录失败异常");
        } catch (MyException1 e) {
            //说白了将检查异常转化为运行时异常
            System.out.println(e.getMessage());
            throw new RuntimeException(e);
        }
    }
}
